package be.fomp.jeve.model;

import be.fomp.jeve.core.exceptions.JEveConfigurationException;
import be.fomp.jeve.model.api.StandardFactory;
import be.fomp.jeve.model.caching.Cacher;
import be.fomp.jeve.model.exceptions.JeveModelException;

public class JeveObjectFactory {
	
	//This is done this way so it can be accessed like this: 
	//JeveObjectFactory factory = new JeveObjectFactory(Cachingmethod);
	// factory.standard.getallianceList();
	// factory.limited.xxxxx()   etc
	
	public final StandardFactory standard;
	//LimitedFactory limited = new LimitedImpl();
	//FullFactory full = new FullImpl();
	public JeveObjectFactory() throws JeveModelException{
		try {
		standard = new StandardFactoryImpl();
		
		// Wrapping exception
		} catch (JEveConfigurationException jce) {
			throw new JeveModelException(jce);
		}
	}
	public JeveObjectFactory(Cacher cacher) throws JeveModelException{
		try {
			standard = new StandardFactoryImpl(cacher);
		
		// Wrapping exception
		} catch (JEveConfigurationException jce) {
			throw new JeveModelException(jce);
		}
	}
}
